package com.jing.controller;


import com.jing.model.Book;
import com.jing.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("book")

public class BookController {
    @Autowired
    private BookService bookService;

    @RequestMapping("onSale")
    public String onSale(@RequestParam Book book) {
        bookService.onSale(book);
        return "success";
    }

}
